package cn.net.shuxing.yifu.config;

import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AlipayConfig {

    public static final String
            URL = "https://openapi.alipay.com/gateway.do",
            APP_ID = "2019022263298311",
            APP_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDBFwjuZB4m4QVzd8Gs1l1+W0Cufa00eyNGkqgJfaBp/IkvsJ6uCkQMSbiI5A0KZC4nX0tzNj3vL7lKfjErz482PZUCcSMl06m/M+PofQQA30lTgxdncHyvXWOofYZ9vKSxwa/QgAnIXODxIrJerLXCeCEoooc/BGf2kmsxhYE/h7yg+oecjZWfjDfW5o5gCqIdLKAznRM7bpctls7UbRZ+y3hSzNpkXYLCr4mV129DTfY+UN5iKyachHlsHM3D62HmAsZjfUXsQuvCBitATseB+TivubqTygPm9mGa/yyeYzLK0g970MHbKa5d+/f7FXSgfrUtt78msHaMYFNeygqLAgMBAAECggEAMPYQU7KbWqxwX2kceSEaL/Ifop9HjikzNq/1YAK07GsWtjsI4YTE4IDJBB0fmWTxtxYY4av9ZGsrhtIc0ckdvVk8MZRSn0LephcYUVlx7G6x/zUceCQz2ZvKq2y476Un9dLxK+Nrl5zFhR+RLySIKjmf3tfnh3ksi39xIuuBbIQjj9Ul170qdAQOGiXtbMiI9DBICS0Uin1uXSsPojhqVNQiudknavLG6229pjDoUYgErgGhBowVhSoM38w7CXlkxDLYHljbfihZpwAvvaJjVth5qkRWNhtrhXh8hm3mjjOvGHEPeDtcnBYP55VwnGE0rJd9+1H+0/b2rYj69KbgIQKBgQDx0AmN/8oob2W3TXA0K5iZwvduqjzM+TvxBsnZzNLPjny7MaHsHMqyQ82VWbUblkC8PXWJxO9wd3Kz9zSvdSIec+VgywUfaXKDO5omkizIDC1oBfedtfRA94NRub3HskMI/mOOQPvfGBSNNf2l2BbZp/mgKRTJXANl9QYAkorfEwK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r7m6k8oD5vZhmv8snmMyytIPe9DB2ymuXfv3+xV0oH61Lbe/JrB2jGBTXsoKiwIDAQAB",
            SIGN_TYPE = "RSA2",
            NOTIFY_URL = "http://zjyifu.vip:8080/front/notify/alipay",
            SYS_SERVICE_PROVIDER_ID = "2088431562627084";

    @Bean
    public AlipayClient alipayClient()
    {
        return new DefaultAlipayClient(URL, APP_ID, APP_PRIVATE_KEY, FORMAT, CHARSET, ALIPAY_PUBLIC_KEY, SIGN_TYPE);
    }


}
